package com.haixiaoke.saas.dept.service.impl;

import java.util.List;

import com.haixiaoke.saas.dept.domain.BizDeptEstate;
import com.haixiaoke.saas.dept.mapper.BizDeptEstateMapper;
import com.haixiaoke.saas.dept.service.IBizDeptEstateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 部门管辖小区Service业务层处理
 * 
 * @author panda
 * @date 2024-03-02
 */
@Service
public class BizDeptEstateServiceImpl implements IBizDeptEstateService {
    @Autowired
    private BizDeptEstateMapper bizDeptEstateMapper;

    /**
     * 查询部门管辖小区
     * 
     * @param deptId 部门管辖小区主键
     * @return 部门管辖小区
     */
    @Override
    public BizDeptEstate selectBizDeptDistrictByDeptId(Long deptId) {
        return bizDeptEstateMapper.selectBizDeptDistrictByDeptId(deptId);
    }

    /**
     * 查询部门管辖小区列表
     * 
     * @param bizDeptEstate 部门管辖小区
     * @return 部门管辖小区
     */
    @Override
    public List<BizDeptEstate> selectBizDeptDistrictList(BizDeptEstate bizDeptEstate) {
        return bizDeptEstateMapper.selectBizDeptDistrictList(bizDeptEstate);
    }

    /**
     * 新增部门管辖小区
     * 
     * @param bizDeptEstate 部门管辖小区
     * @return 结果
     */
    @Override
    public int insertBizDeptDistrict(BizDeptEstate bizDeptEstate) {
        return bizDeptEstateMapper.insertBizDeptDistrict(bizDeptEstate);
    }

    /**
     * 修改部门管辖小区
     * 
     * @param bizDeptEstate 部门管辖小区
     * @return 结果
     */
    @Override
    public int updateBizDeptDistrict(BizDeptEstate bizDeptEstate) {
        return bizDeptEstateMapper.updateBizDeptDistrict(bizDeptEstate);
    }

    /**
     * 批量删除部门管辖小区
     * 
     * @param deptIds 需要删除的部门管辖小区主键
     * @return 结果
     */
    @Override
    public int deleteBizDeptDistrictByDeptIds(Long[] deptIds) {
        return bizDeptEstateMapper.deleteBizDeptDistrictByDeptIds(deptIds);
    }

    /**
     * 删除部门管辖小区信息
     * 
     * @param deptId 部门管辖小区主键
     * @return 结果
     */
    @Override
    public int deleteBizDeptDistrictByDeptId(Long deptId) {
        return bizDeptEstateMapper.deleteBizDeptDistrictByDeptId(deptId);
    }

    @Override
    public int insertBatchDeptDistrict(List<BizDeptEstate> deptDistrictList) {
        return bizDeptEstateMapper.insertBatchDeptDistrict(deptDistrictList);
    }
}
